﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Imgalib.Utility
{
    public class VBToCSharpUtility
    {
        public String Right(String original, Int32 numberCharacters)
        {
            return original.Substring(numberCharacters > original.Length ? 0 : original.Length - numberCharacters);
        }

        public String Left(String original, Int32 Count)
        {

            if (original == null || original == string.Empty || original.Length < Count)
            {
                return original;
            }
            else
            {

                return original.Substring(0, Count);
            }
        }

        public String Mid(String original, Int32 startIndex, Int32 b)
        {
            String temp = original.Substring(startIndex - 1, b);
            return temp;
        }

        public String Mid(String original, Int32 startIndex)
        {
            String result = original.Substring(startIndex);

            return result;
        }
    }
}
